package com.gali.springcloud.service.impl;

import com.gali.springcloud.dao.DeptDao;
import com.gali.springcloud.entity.Dept;
import com.gali.springcloud.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Auther: gali
 * @Date: 2022/7/9 - 07 - 09 - 18:46
 * @Description:
 * @version: 1.0
 */
@Service
public class DeptServiceImpl implements DeptService
{
    @Resource
    private DeptDao dao;

    @Override
    public boolean add(Dept dept)
    {
        return dao.addDept(dept);
    }

    @Override
    public Dept get(Long id)
    {
        return dao.findById(id);
    }

    @Override
    public List<Dept> list()
    {
        return dao.findAll();
    }

}

